import requests

if __name__ == '__main__':
    # 请求用户注册
    # get传参  定义字典
    url = 'http://127.0.0.1:8080/'
    res = {'username':'admin','password':'123','phone':110,"email":'admin@qq.com'}
    # params 指定get请求参数
    res1 = requests.get(url + '/stest/user/regist.action', params=res)
    print(res1.text)
    print(res1.json()['status'])
    print(res1.json()['msg'])
    # 获取http的响应状态码
    print(res1.status_code)
    print(res1.headers)
